using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using MyCollections.Utils;

namespace MyCollections.Model
{
    [Serializable]
    public class MovieCollection : ImdbServices.Movie
    {
        public MovieCollection() { }

        public MovieCollection(ImdbServices.Movie movie):base()
        {
            loadMovieData(movie);
        }

        public void loadMovieData(ImdbServices.Movie movie)
        { 
            this.Actors = movie.Actors;
            this.Description = movie.Description;
            this.Directors = movie.Directors;
            this.Genres = movie.Genres;
            //this.HasTrailer = movie.HasTrailer;
            this.ID = movie.ID;
            this.Image = 
                !String.IsNullOrEmpty(movie.ImageURL) ? 
                Bitmap_.LoadPicture(movie.ImageURL) : 
                null;
            this.ImageURL = movie.ImageURL;
            this.ImdbID = movie.ImdbID;
            this.Index = movie.Index;
            this.IsTvSerie = movie.IsTvSerie;
            this.KnownTitles = movie.KnownTitles;
            this.Languages = movie.Languages;
            this.LoanDate = movie.LoanDate;
            this.Loaned = movie.Loaned;
            this.MusicBy = movie.MusicBy;
            this.Producers = movie.Producers;
            this.Rated = movie.Rated;
            this.Rating = movie.Rating;
            this.RecommendedFilms = movie.RecommendedFilms;
            this.RegionCode = movie.RegionCode;
            this.ReleaseDate = movie.ReleaseDate;
            this.Runtime = movie.Runtime;
            this.Seasons = movie.Seasons;
            this.SpecialEffects = movie.SpecialEffects;
            this.Studios = movie.Studios;
            this.Tag = movie.Tag;
            this.Tagline = movie.Tagline;
            this.Title = movie.Title;
            this.TrailerURL = movie.TrailerURL;
            this.Votes = movie.Votes;
            this.WantedTitle = movie.WantedTitle;
            this.Writers = movie.Writers;
            this.Year = movie.Year;
        }

        private bool validate;        

        public bool Validate
        {
            get { return validate; }
            set { validate = value; }
        }
    }
}
